package model;

import java.util.ArrayList;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name="MP3List")
public class MP3FileList {
	
	/*****************************
	 * MEMBER
	 *****************************/

	private ArrayList<MP3FileMutableTreeNode> fileList;
	
	private String path;
	
	/*****************************
	 * CONSTRUCTOR
	 *****************************/
	public MP3FileList() {
		this.fileList = new ArrayList<MP3FileMutableTreeNode>();
	}
	public MP3FileList(String path) {
		this();
		this.path = path;
	}
	@XmlElement(required=true)
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	@XmlElement(required=true)
	public ArrayList<MP3FileMutableTreeNode> getFileList() {
		return fileList;
	}

	public void setFileList(ArrayList<MP3FileMutableTreeNode> fileList) {
		this.fileList = fileList;
	}
	
	public void addFile(MP3FileMutableTreeNode file) {
		fileList.add(file);
	}
	
	@Override
	public String toString() {
		return this.path;
	}

}
